package com.example.travel.service.impl;

import com.example.travel.entity.dto.FestivalDTO;
import com.example.travel.entity.dto.HotelDTO;
import com.example.travel.entity.dto.ScenicDTO;
import com.example.travel.entity.dto.ScenicImgDTO;
import com.example.travel.mapper.AdminInsertMapper;
import com.example.travel.service.IAdminInsertService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminInsertService implements IAdminInsertService {

    @Autowired
    private AdminInsertMapper adminInsertMapper;

    @Override
    public boolean insertHotelInformation(HotelDTO hotelDTO) {
        return adminInsertMapper.insertHotelInformation(hotelDTO);
    }

    @Override
    public int insertScenicInformation(ScenicDTO scenicDTO) {
        adminInsertMapper.insertScenicInformation(scenicDTO);
        return scenicDTO.getId().intValue();
    }

    @Override
    public int uploadScenicImg(ScenicImgDTO scenicImgDTO) {
        return adminInsertMapper.uploadScenicImg(scenicImgDTO);
    }

    @Override
    public boolean insertFestivalInfomation(FestivalDTO festivalDTO) {
        return adminInsertMapper.insertFestivalInfomation(festivalDTO);
    }
}
